import service from '../utils/service'

export const test = () => service.get('/hotWordBillboardCategory')

// 封装获取分类列表数据的请求
export const reqCategoryList = () =>
  service.get('/m-revision/page/category/queryCategoriesV2')

// 封装获取一二级分类下的分类的请求
export const reqCategoryDetail = (categoryId: any) =>
  service.get(`/revision/category/v2/metadata/info?categoryId=${categoryId}`)

// 封装获取一二级分类下的详情列表的请求
export const reqCategoryDetailList = (
  pageNum: any,
  pageSize: any,
  sort: any,
  categoryId: any,
  categoryString: any
) =>
  service.get(
    `/revision/category/v2/albums?pageNum=${pageNum}&pageSize=${pageSize}&sort=${sort}&categoryId=${categoryId}&metadataValues=${categoryString}`
  )

// 封装获取一二级分类下的详情列表的请求
export const reqCategoryDetailList_init = (
  pageNum: any,
  pageSize: any,
  sort: any,
  categoryId: any
) =>
  service.get(
    `/revision/category/v2/albums?pageNum=${pageNum}&pageSize=${pageSize}&sort=${sort}&categoryId=${categoryId}`
  )
